<?php require_once("../config.php"); ?>
<div class="leftmenu">
    <ul>
        <?php foreach ($list_modules as $module) { 
        		if (strlen($module['parent'])<=0){ ?>
        <li><a href="<?php echo $module['url']; ?>" class="<?php echo $module['class']; 
        													$sub = 0;
       														foreach($list_modules as $subs) {
       															if ($module['id_Module'] == $subs['parent']){
																	$sub++;
       															}
       														}
       														if ($sub>0){
       															echo ' menudrop';
       														}

        ?>"><span><?php echo $module['Module']; ?></span></a>
       		<?php 
       			if ($sub>0){ ?>
       			  <ul>
       			  <?php 
       				foreach($list_modules as $subm) {
       					if ($module['id_Module']== $subm['parent']){ ?>
							<li><a href="<?php echo $subm['url']; ?>"><span><?php echo $subm['Module']; ?></span></a></li>
       			  <?php }  
       				} ?>
       			  </ul>
       	  <?php }	
        	}
        } ?>
    	</li>
    </ul>
</div><!--leftmenu-->
<div id="togglemenuleft"><a></a></div>



